package com.xiaohong.websocket.feign;

import com.xiaohong.websocket.fallback.ChatCentreFallback;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author : xiaohong
 * @date : 2021/5/11 22:13
 */
@FeignClient(name="xiaohong-chat-websocket",contextId = "chatCentre",fallback= ChatCentreFallback.class)
public interface ChatCentreFeigh {

    /**
     * 获取指定用户连接状态
     * @param cid
     * @return 0 用户离线 1 用户在线 2 用户隐身 3用户不存在
     */
    @GetMapping("/chatCentre/status/{cid}")
    Result<Integer> getStatus(@PathVariable Long cid);

}
